import React from 'react';
import Zcon from '@cbd/icon';
import { Button } from 'antd';

const CardTitle = (props) => {
  const { total = 0, handleCreateVisible, addVisible } = props;
  return (
    <div>
      <span className='list__title'>{`租户列表（${total}）`}</span>
      {addVisible && (
        <Button type="primary" size='small' onClick={() => handleCreateVisible(true)}>
          <Zcon type='plus' style={{ fontSize: '14px' }} />
          <span>&nbsp;&nbsp;新增</span>
        </Button>
      )}
    </div>
  );
}
export default CardTitle;